#include <cstdlib>
#include <string>
#include <iostream>
#include <vector>
#include <climits>

using namespace std;


struct TreeNode {
    int val;
    TreeNode *left;
    TreeNode *right;
    TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};

class Solution {
public:
	bool travelCmp(TreeNode* root1, TreeNode* root2){
		if (root1 == NULL && root2 == NULL) return true;
		if (root1 == NULL || root2 == NULL) return false;
		return root1->val == root2->val && 
			travelCmp(root1->left, root2->right) && travelCmp(root1->right, root2->left);
	}
	bool isSymmetric(TreeNode *root) {
		return travelCmp(root, root);
	}
};
int main(int argc, char argv){
	
	return 0;
}